#!/usr/bin/python2.5
# LEAVE THE FOLLOWING TWO LINES
# GAME BAKER
# yaml
# 0
s = """
!!python/object:game.Game
gameobjects:
  Ship: !!python/object:game.GameObject
    baseworkstate: ws_ship
    name: Ship
    objtype: Gameobject
    requires: []
    sprite: null
  emitter: &id001 !!python/object:game.GameObject
    baseworkstate: ws_emitter
    name: emitter
    objtype: Gameobject
    requires: []
    sprite: null
  emitter2: &id002 !!python/object:game.GameObject
    baseworkstate: ws_emitter2
    name: emitter2
    objtype: Gameobject
    requires: []
    sprite: null
  particle: !!python/object:game.GameObject
    baseworkstate: ws_particle
    name: particle
    objtype: Gameobject
    requires: []
    sprite: explosionsprite
gamescreens:
  None: !!python/object:game.GameScreen
    color: !!python/tuple [0, 0, 0]
    dimensions: !!python/tuple [800, 600]
    objtype: Gamescreen
    startobjects:
    - *id001
    - *id002
initcode: import random
objtype: Game
sprites:
  explosionsprite: !!python/object:game.Sprite
    alphakey: !!python/tuple [0, 0, 0]
    framerate: 1
    imagefiles:
    - bottomright: !!python/tuple [60, 42]
      filename: images/BlenderExplosionSmall.bmp
      topleft: !!python/tuple [0, 0]
    - bottomright: !!python/tuple [120, 42]
      filename: images/BlenderExplosionSmall.bmp
      topleft: !!python/tuple [60, 0]
    - bottomright: !!python/tuple [180, 42]
      filename: images/BlenderExplosionSmall.bmp
      topleft: !!python/tuple [120, 0]
    - bottomright: !!python/tuple [240, 42]
      filename: images/BlenderExplosionSmall.bmp
      topleft: !!python/tuple [180, 0]
    - bottomright: !!python/tuple [300, 42]
      filename: images/BlenderExplosionSmall.bmp
      topleft: !!python/tuple [240, 0]
    - bottomright: !!python/tuple [360, 42]
      filename: images/BlenderExplosionSmall.bmp
      topleft: !!python/tuple [300, 0]
    name: explosionsprite
    objtype: Sprite
startscreen: None
title: ''
workstates:
  ws_emitter: !!python/object:game.WorkState
    actions: {1: 'self.x = 100

        self.y = 400

        self.vx = 4

        self.vy = 0


        self.resize(0,0)


        self.set_timer(2)


        ', 3: '

        self.move_velocity()', 9: '

        self.vx = - self.vx', 11: 'a = gamescreen.add_object("particle","p" + str(int(
        4 * random.random() ) ) )

        a.x = self.x

        a.y = self.y


        """

        a = gamescreen.add_object("particle","p" + str(int( 5 * random.random() )
        ) )

        a.x = self.x

        a.y = self.y

        """

        self.set_timer(0.1 * random.random())'}
    inherits: null
    objtype: Workstate
  ws_emitter2: !!python/object:game.WorkState
    actions: {1: 'self.x = 75

        self.y = 400


        self.vx = 0

        self.vy = 0


        self.set_timer(1)'}
    inherits: ws_emitter
    objtype: Workstate
  ws_particle: !!python/object:game.WorkState
    actions: {1: '

        self.x = 400

        self.y = 300

        self.vx = 3 - int(random.random() * 6)

        self.vy = - 3*(3 + int(random.random() * 3))

        self.resize(58,43)

        self.color = (190 +int( 65*random.random()),25 + int(70 * random.random()),30)

        self.clear()', 3: '

        self.move_velocity()

        self.vy +=2'}
    inherits: null
    objtype: Workstate
  ws_ship: !!python/object:game.WorkState
    actions: {1: 'self.x = 80

        self.y = 390

        self.z = 10

        self.vx = 4

        self.vy = 0

        self.resize(10,75)

        self.color=(0,0,255)

        self.clear()

        pass', 3: '

        self.move_velocity()', 9: '

        self.vx = - self.vx

        '}
    inherits: null
    objtype: Workstate

"""
if __name__ == "__main__":
  import gbfileio,sys,runtime
  game = gbfileio.loadgame(sys.argv[0])
  runtime.run_game(game)
